import multiprocessing as mu
import time,os
a=1
def func1():
    print("start the process")
    print(os.getpid())
    print(os.getppid())
    time.sleep(15)
    print("end the process")

def func2():
    print("start the parent process")
    print(os.getpid())
    print(os.getppid())
    time.sleep(15)
    print("end the parent process")

def main():
    p1=mu.Process(target=func1)
    p1.start()
    func2() # 如果想让父子进程同时执行,则需要把父进程放在start后,join之前
    p1.join()


if __name__=="__main__":
    main()